package com.yuch.commons;

import lombok.Data;

@Data
public class R {
    private Object data;
    private String msg;

    private int code;

    public static R yes(Object data){

        R r = new R();
        r.code=1;
        r.data=data;
        r.msg="SUCCESS";
        return r;
    }

    public static R error(String msg){
        R r = new R();
        r.code=0;
        r.data=null;
        r.msg=msg;
        return r;
    }


}
